package com.example.busshop.entity;

import com.example.busshop.common.entity.LogicEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.*;

@Entity
@Table(name = "item")
@Setter
@Getter
//@Where(clause="is_deleted=0")
@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"},ignoreUnknown = true)
public class Item extends LogicEntity {
    @Column
    private String name;
//    @Column (unique = true,nullable = false,length = 30)
//    private String barcode;
    @Column(nullable = false)
    private Double price;
//    @ManyToOne(fetch = FetchType.LAZY)
//    private Shop shop;
//    @OneToOne(fetch = FetchType.LAZY,orphanRemoval = true,cascade = CascadeType.ALL)
//    private LineItem lineItem;

}
